<?php include PATH_TPL."/tpl_header.html" ?>
<script type="text/javascript">
	$(function(){
		$("#course-menu").addClass('in');
	})
</script>

<div class="header">
    <h1 class="page-title">课程管理</h1>
</div>
        
<ul class="breadcrumb">
    <li><a>课程管理</a> <span class="divider">/</span></li>
    <li class="active">教授的课程</li>
</ul>

<div class="container-fluid">
    <div class="row-fluid">
		<div class="btn-toolbar">
		    <!-- <button class="btn" id="downLoadBtn">导出</button> -->
		</div>
		<div class="well">
		    <table class="table">
		    	<?php if (!empty($allCourse)) {?>
		      <thead>
		        <tr>
		          <th><?php echo $fieldName['course_id']['comment'] ?></th>
		          <th><?php echo $fieldName['coursename']['comment'] ?></th>
		          <th><?php echo $fieldName['course_description']?></th>
		          <th><?php echo $fieldName['term']['comment'] ?></th>
		          <th><?php echo $fieldName['credit']['comment'] ?></th>
		          <th><?php echo $fieldName['hours']['comment'] ?></th>
		          <th><?php echo $fieldName['plimit']['comment'] ?></th>
		          <th><?php echo $fieldName['persons']['comment'] ?></th>
		          <th><?php echo $fieldName['active']['comment'] ?></th>
		          <th style="width: 150px;">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php foreach ($allCourse as $course) { ?>
		        <tr>
		          <td><?php if($course['active']==1){?><a href="<?php echo SITE_ROOT.'teacher/show-all-courses/id/'.$course['course_id']?>"><?php echo $course['course_id']?>
		          	<?php }else{ echo $course['course_id'];} ?>
		          </td>
		          <td><?php if($course['active']==1){?><a href="<?php echo SITE_ROOT.'teacher/show-all-courses/id/'.$course['course_id']?>"><?php echo $course['coursename'] ?>
						<?php }else{echo $course["coursename"];}?>
		          </td>
		          <td><abbr title="<?php echo $course['course_description'] ?>" style="font-style: italic">课程描述</abbr></td>
		          <td><?php echo $term[$course['term']]?></td>
		          <td><?php echo $course['credit']?></td>
		          <td><?php echo $course['hours']?></td>
		          <td><?php echo $course['plimit']?></td>
		          <td><?php echo $course['persons']?></td>
		          <td><?php echo $active[$course['active']]?></td>
		          <td>
		              <a href="<?php echo SITE_ROOT.'teacher/show-all-courses/id/'.$course['course_id']?>"><i class="icon-pencil"></i>查看成绩</a>&nbsp;
		              <a href="<?php echo SITE_ROOT.'teacher/input-grades/id/'.$course['course_id']?>"><i class="icon-search">录入成绩</i></a>
		          </td>
		        </tr>
		        <?php }?>
		      </tbody>
		      <?php }else{?>
		      <tr><td>暂无课程信息</td></tr>
		      <?php }?>
		    </table>
		    <i>注：将鼠标移动到“<font color="blue">课程描述</font>”即可看到对应课程的描述详情</i>
		</div>
	</div>
</div>
<?php include PATH_TPL."/tpl_sidebar.html" ?>